package com.gamecauca.common;

public class Constant {
	
	public static final String FONT_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+";
	
	public static final int GO_AHEAD = 0;// THUYEN DI CHUYEN TOI TRUOC
    public static final int GO_BACK = 1;//THUYEN DI CHUYEN DI LUI
    
    public static final int TOTAL_FISH = 20;
    
    public static final int NUM_OF_KIND_FISH = 8;
    public static final int NUM_OF_KIND_SHRIMP = 1;

    public static final int NUM_OF_FISH = 8;
    public static final int NUM_OF_SHRIMP = 2;
    public static final int NUM_OF_MOSS = 2;
    public static final int NUM_OF_CRAB = 1;
    public static final int NUM_OF_SHELLS = 1;
    
    public static final int COIN_FISH_1 = 16;
    public static final int COIN_FISH_2 = 16;
    public static final int COIN_FISH_3 = 16;
    public static final int COIN_SHRIMP = 16;
    public static final int COIN_MOSS = 0;
    public static final int COIN_CRAB = 16;
    public static final int COIN_SHELLS = 16;
    
    public static final int CELLS_HORIZONTAL = 16;
    public static final int CELLS_VERTICAL = 12;
    public static final int CELL_WIDTH = 32;
    public static final int CELL_HEIGHT = CELL_WIDTH;
    public static final int DOWN = 7;
    //cac huong di chuyen cua cac doi tuong
    public static final int RIGHT = 0;//
    public static final int LEFT = 1;
    public static final int RIGHT_UP = 2;
    public static final int RIGHT_DOWN = 3;
    public static final int LEFT_UP = 4;
    public static final int LEFT_DOWN = 5;
    public static final int UP = 6;

    public static final int WATERLINE = 300;
    public static final int BACKGROUND = 0;

    //mang ca huong co the co sau khi va cham bien tren | duoi 
    public static final int arrDirect1 [] = {RIGHT_UP,RIGHT_DOWN};
    public static final int arrDirect2 [] = {LEFT_UP,LEFT_DOWN};
    public static final int arrDirect3 [] = {RIGHT,RIGHT_DOWN};
    public static final int arrDirect4 [] = {RIGHT_UP,RIGHT};
    public static final int arrDirect5 [] = {LEFT,LEFT_DOWN};
    public static final int arrDirect6 [] = {LEFT,LEFT_UP};

    //huong xuat hien cua cac doi tuong tren man hinh
    public static final int RIGHTSIDE = 0;
    public static final int LEFTSIDE = 1;

    // cac loai doi tuong
    public static final int FISH = 0;	//cá
    public static final int MOSS = 1;//rong rêu
    public static final int CRAB = 2;//cua
    public static final int ITEM = 3;// vật phẩm
    public static final int SHRIMP = 4;// tôm
    public static final int CUTLE = 5;//mực
    public static final int SHELLS = 6;//oc
    public static final int PERSON = 7;// NGUOI CHOI
    public static final int CLOUD = 8;// may
    public static final int TOOLS = 9;// may

    //vi tri doi tuong boat

    //vi tri day cau, moc cau

    //khai bao cac phan tu, mang ve music
    
    public static final int CONTROL_LEFT = 0;
    public static final int CONTROL_RIGHT = 1;
    public static final int CONTROL_HIT = 2;
    public static final int CONTROL_FISHING = 3;
    
    public static final int SCREEN_WIDTH = 800;
    public static final int SCREEN_HEIGHT = 480;
    
    public static final int STANDBY = 0;
    public static final int GOTOLEFT = 1;
    public static final int GOTORIGHT = 2;
    public static final int ATTACK = 3;
    public static final int FISHING = 4;
    public static final int HEALTH = 5;
    public static final int STRENGTH = 6;
    public static final int TIME = 7;
    public static final int BOMB = 8;
    public static final int LINE = 9;
    public static final int PROTECT = 10;
    public static final int COLLECT = 11;
    public static final int DRINKING = 12;
    public static final int CANNOTFISHING = 13;
    public static final int EATING = 14;
    
    
    
   
    public static final int CatalogScreen = 0;
    public static final int ChooseModeScreen = 1;
    public static final int GameScreen = 2;
    public static final int HelpScreen = 3;
    public static final int LoadGameScreen = 4;
    public static final int LogInScreen = 5;
    public static final int MainMenuScreen = 6;
    public static final int OptionScreen = 7;
    public static final int ShopItemsScreen = 8;
    
    public static final int MONEYINIT = 10000;
	
 
    public static final int BIGCLOUD = 0;
    public static final int SMALLCLOUD = 1;
    public static final int BLACKCLOUD = 2;
    public static final int LIGHTING = 3;
    
    
    public static final int BANHMI = 0;
    public static final int HAMBERGER = 1;
    public static final int BANHCHUNG = 2;
    public static final int DUIGA = 3;
    public static final int MIGOI = 4;
    public static final int THUOCUONG = 5;
    public static final int COCACOLA = 6;
    public static final int SUATUOI = 7;
    public static final int XIGA = 8;
    public static final int NUOCTANGLUC = 9;
    public static final int RUOUNAPOLEONG = 10;
    public static final int RUOUNEP = 11;
    public static final int RUOUNUNHIHONG = 12;
    public static final int DONGHOCAT = 13;
    public static final int DONGHOQUALAC = 14;
    public static final int DONGHODEOTAY = 15;
    public static final int BINHACQUY = 16;
    public static final int BOMBANG = 17;
    public static final int BOMSINHHOC= 18;
    public static final int BOMNHO = 19;
    public static final int BOMTO = 20;
    public static final int DAYCAUNGAN = 21;
    public static final int DAYCAUDAI = 22;
    public static final int DU = 23;
    public static final int NONLA = 24;
    
    //state cac item trong game
    public static final int ITEMINFISHING = 0;//ITEM DANG BOI HOAC ROI RA TU BOSS
//    public static final int ITEMINOTHER= 1;//ITEM DANG NAM TREN THANH CONG CU ,TRONG THUNG DO VA MARKET
    public static final int ITEMINMARKETANDBOX= 1;
    public static final int ITEMINTOOLBAR= 2;
    
    public static final int FISH1 = 1;
    public static final int FISH2 = 2;
    public static final int FISH3 = 3;
    public static final int FISH4 = 4;
    public static final int FISH5 = 5;
    public static final int FISH6 = 6;
    public static final int FISH7 = 7;
    public static final int FISH8 = 8;
    public static final int FISH9 = 9;
    public static final int FISH10 = 10;
    public static final int FISH11 = 11;
    public static final int FISH12 = 12;
    public static final int FISH13 = 13;
    public static final int FISH14 = 14;
    public static final int FISH15 = 15;
    public static final int FISH16 = 16;
    public static final int FISH17 = 17;
    public static final int FISH18 = 18;
    
    // BOSS VA HAI TAC
    public static final int PIRATE1 = 1;
    public static final int PIRATE2 = 2;
    public static final int PIRATE3 = 3;
    public static final int BOSS1 = 4;
    public static final int BOSS2 = 5;
    public static final int BOSS3 = 6;
    
    public static final int FISH_DANGBOI = 0;
    public static final int FISH_KEOLEN = 1;
    public static final int FISH_GIATCAU = 2;
    public static final int FISH_DEAD = 3;
    
    
    public static final int BANDAU = 0;
    public static final int BATDAU_DEM = 1;
    public static final int NGUNG_DEM = 2;
    
    
    public static boolean checkCollision(int x1, int y1, int x2, int y2,int x3, int y3) {
        if (x2 <= x1 && x1 <= x3 && y2 <= y1 && y1 <= y3) { 
            return true;
        }
        else return false;
    }
    
    public static boolean checkCollisionFishCollect(int x0, int x1, int y1, int x2, int y2,int x3, int y3){
    	
    	if ((x2 <= x1 && x1 <= x3 && y2 <= y1 && y1 <= y3) || ((x2 <= x0 && x0 <= x3 && y2 <= y1 && y1 <= y3))) { 
            return true;
        }
        else return false;
    }
    
    public static boolean checkCollision(int xB, int yB, int wB, int hB, int xF, int yF, int wF, int hF)
    {
    	
    	xB = xB - (wB/2);
    	yB = yB - (hB/2);
    	
    	
    	if(xF >= xB && xF <= xB + wB && yF >= yB && yF <= yB + hB){
    		return true;
    	}
    	
    	if(xF + wF >= xB && xF + wF <= xB + wB && yF >= yB && yF <= yB + hB){
    		return true;
    	}
    	
    	if(xF + hF >= xB && xF + hF <= xB + wB && yF + hF >= yB && yF + hF <= yB + hB){
    		return true;
    	}
    	
    	if(xF + wF >= xB && xF + wF <= xB + wB && yF + hF >= yB && yF + hF <= yB + hB){
    		return true;
    	}
    	
    	return false;
    }
}